<!DOCTYPE html>
<html>
<head>
   <meta charset="utf-8">
   
</head>
<body>
      <img id="myimg" src="../imgs/mm016.jpg" alt="MM016" width="600" height="300" loadpic="我也不知道" data-img="66666">

      <script>
          console.log(myimg.src);
          console.log(myimg.getAttribute("src"));
          console.log(myimg.getAttributeNode("src").nodeValue);

          console.log(myimg.loadpic);
          console.log(myimg.getAttribute("loadpic"));
          console.log(myimg.getAttribute("data-img"));
          console.log(myimg.getAttributeNode('data-img').nodeValue);
      </script>
</body>
</html>